package com.k2data.k2app.mapper;

import com.k2data.k2app.domain.po.DeviceCustomColumn;
import com.k2data.k2app.mybatis.mapper.K2Mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author lidong9144@163.com 17-3-15.
 */
@Mapper
@Repository
public interface DeviceCustomColumnMapper extends K2Mapper<DeviceCustomColumn> {

    @Select("SELECT value FROM device_custom_column WHERE device_id = #{deviceId} AND name_en = #{nameEn}")
    String getValue(@Param("deviceId") Long deviceId, @Param("nameEn") String nameEn);

}
